cucDefine(['common'], function(common){
    let {loadStyle, commonInit, commonVar} = common;
    class TitleJH1 extends HTMLElement {
        constructor() {
            super();
            commonInit(this);
            let shadow = this.attachShadow({mode: 'open'});
            loadStyle(shadow, commonVar.rootPath + "/assets/component/title/title.css");
            if(this.getAttribute("theme") == "green"){
                loadStyle(shadow, commonVar.rootPath + "/assets/component/title/title_green.css");
            }
            if(["/terms","/privacy","/judgers","/help","/about","/worldwide"].includes(location.pathname.replace(commonVar.rootPath, ""))){
                loadStyle(shadow, commonVar.rootPath + "/assets/component/title/title_misc.css");
            }
            let imglogo = document.createElement("img");
            imglogo.src = commonVar.rootPath + "/assets/img/logo.png" 
            let head1 = document.createElement("h1");
            head1.className = "jh-title1";
            this.innerHTML && (head1.innerText = this.innerHTML);
            this.hasAttribute("text") && (head1.innerText = this.getAttribute("text"));
            shadow.appendChild(imglogo);
            shadow.appendChild(head1);
            // this.onMounted();
        }
    }
    return TitleJH1;
});